﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
class TimeOfDay : IComparable<TimeOfDay>
{
    DateTime resultDate = DateTime.Today;
    public TimeOfDay(double time) {
        this.resultDate = resultDate.AddHours(time);
    }
    public TimeOfDay Add(double time) {
        this.resultDate = this.resultDate.AddHours(time);
        return this;
    }
    public override string ToString() {
        return this.resultDate.ToString("HH:mm");
    }

    public int CompareTo(TimeOfDay tod) {
        return resultDate.CompareTo(tod.resultDate);
    }
}
